<?php
include_once("../../service/categoryService.php");
$cateParentId = $_GET["cateId"];
if($_GET["cateId"] == ""){
    $cateParentId = 0;
}else{
    $cateParentId = $_GET["cateId"];
}
$opts = getAvailableOptionOfCategory(0,$cateParentId);

$last = mysql_num_rows($opts);
$runner = 1;
while($opt = mysql_fetch_array($opts)){
    echo $opt["OPP_ID"] . "@" .$opt["OPP_NAME"]."@";
    if(isOptionDeleteTable($opt["OPP_ID"])){
        echo "1";
    }else{
        echo "0";
    }
    if($runner < $last){
        echo ";";
    }
    $runner++;
}
?>
